function hfocus() {
	var vtext = document.getElementById("index_hotelname");
	if (vtext.value == "请输入您要查询的饭店名") {
		vtext.value = "";
	}
}

function hblur() {
	var rtext = document.getElementById("index_hotelname");
	if (rtext.value.length == 0) {
		rtext.value = "请输入您要查询的饭店名";
	}
}

function vfocus() {
	var vtext = document.getElementById("index_dish");
	if (vtext.value == "请输入您要查询的菜名") {
		vtext.value = "";
	}
}

function vblur() {
	var rtext = document.getElementById("index_dish");
	if (rtext.value.length == 0) {
		rtext.value = "请输入您要查询的菜名";
	}
}

/*
 * login.jsp
 */

function loginCheck() {
	var account = document.getElementById("account").value;
	var customerPwd = document.getElementById("customerPwd").value;
	var type = document.getElementById("type").value;
	if (account.length == 0) {
		alert("请输入您的账号!");
	} else {
		if (customerPwd.length == 0) {
			alert("请输入您的密码!");
		} else {
			if(type == "Customs"){
				document.loginForm.action = "customer.do";
				document.getElementById("method").value = "loginCustomer";
			} else if(type == "Sender"){
				document.loginForm.action = "customer.do";
				document.getElementById("method").value = "loginSender";
			} else if(type == "Hotel"){
				document.loginForm.action = "sender.do";
				document.getElementById("method").value = "loginHotel";
			}
			loginForm.submit();
		}
	}
}

function tologin() {
	if (true) {
		document.getElementById("mask").style.height = (document.body.clientHeight + 30) + 'px';
		document.getElementById("mask").style.width = (document.body.clientWidth + 20) + 'px';
		document.getElementById("mask").style.display = 'block';
		document.getElementById("loginform").style.top = (window.screen.availHeight - 480) / 2 + 'px';
		document.getElementById("loginform").style.left = (document.body.clientWidth - 400) / 2 + 'px';
		document.getElementById("loginform").style.display = 'block';
	}
}

function loginclose() {
	if (confirm("您真的要退出登录吗?")) {
		document.getElementById("loginform").style.display = 'none';
		document.getElementById("mask").style.display = 'none';
	}
}
//如果要关闭这个层只要让他们设置为隐藏就可以了。

